#include <boost/lexical_cast.hpp>
#include "FlightChessBoardSystemConfig.h"

using namespace boost;

namespace model_flight_chess_board
{
	FlightChessBoardSystemConfig::FlightChessBoardSystemConfig() : config_("server.conf")
	{
		//解析基本的配置文件
		serverIp_ = config_.GetProperty("SERVER.SERVER_IP");
		serverPort_ = lexical_cast<uint16_t>(config_.GetProperty("SERVER.PORT"));
		dbServerIp_ = config_.GetProperty("DB.IP");
		dbServerPort_ = lexical_cast<uint16_t>(config_.GetProperty("DB.PORT"));
		dbUser_ = config_.GetProperty("DB.USER");
		dbPassword_ = config_.GetProperty("DB.PASS");
		dbName_ = config_.GetProperty("DB.NAME");
		airlineListJsonStr_ = config_.GetProperty("FLIGHT_CHESS_BOARD.AIR_LINE");
		planeListJsonStr_ = config_.GetProperty("FLIGHT_CHESS_BOARD.PLANE_NO");
	}
};
